<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
  <meta name="renderer" content="webkit">
  <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
  <title>{$config.site_name}</title>
  <link rel="stylesheet" href="/static/app/css/home.css">
  <!--[if IE]>
  <script>window.location.href = '/compatibility.html';</script>
  <![endif]-->
</head>
<body>
<div id="bg"></div>
<div id="mask"></div>
<div id="login-btn">SIGN IN</div>
<div id="login-box">
  <input type="text" name="account" placeholder="请输入用户名或邮箱">
  <input type="password" name="password" placeholder="请输入密码">
  <button type="button" id="login">登录</button>
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js"></script>
<script>
  $('#login-btn').click(function () {
    $('#login-box').css('display', 'flex')
    setTimeout(function () {
      $(this).hide();
      $('body').addClass('fade')
    }.bind(this), 60)
  });
  $('#login').click(function () {
    $.ajax({
      url: '',
      type: 'post',
      data: {
        account: $('[name=account]').val(),
        password: $('[name=password]').val(),
      },
      success: function (response) {
        alert(response.msg);
        if (response.code) {
          history.go(0)
        }
      }
    });
  });
</script>
</html>
